package com.itheima.juc16;

/**
 * @author li
 * 需求：某电影院目前正在卖电影票，共有100张票，而它有3个窗口卖票，请设计一个程序模拟该电影院卖票
 * 用Lock来实现
 */
public class ThreadDemo1 {
    public static void main(String[] args) {
        MyThread1 t1 = new MyThread1();
        MyThread1 t2 = new MyThread1();
        MyThread1 t3 = new MyThread1();

        t1.setName("窗口1");
        t2.setName("窗口2");
        t3.setName("窗口3");

        t1.start();
        t2.start();
        t3.start();
    }
}
